import http from "../utils/http";
import {Park} from "../type.ts";
const BASE_URL = '/apple/park'
export default {
    queryList:function (){
        return http.get(BASE_URL +"/list");
    },
    insert:function (data:Park){
        return http.post(BASE_URL, {data});
    },
    queryById:function (id:string){
        return http.get<Park[]>(BASE_URL, {params: {id}});
    },
    update:function (data:Park){
        return http.put(BASE_URL, {data});
    },
    deleteById:function (id:string){
        return http.delete(BASE_URL + "?id=" + id, );
    },
    queryNotice:function (){
        return http.get(BASE_URL +"/notice");
    },
    queryCost:function (){
        return http.get(BASE_URL +"/chart/cost");
    },
    queryChart:function (){
        return http.get(BASE_URL +"/chart");
    }
}